package com.thinkgem.jeesite.modules.abk.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;

import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.web.BaseController;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.modules.abk.entity.AbkAppDemo;
import com.thinkgem.jeesite.modules.abk.entity.AbkTestGen;
import com.thinkgem.jeesite.modules.abk.service.AbkAppDemoService;
import com.thinkgem.jeesite.modules.abk.service.AbkTestGenService;

/**
 * ABKauto生成Controller
 * @author ThinkGem
 * @version 2017-02-16
 */
@Controller
@RequestMapping(value = "/abk/abkMap")
public class AbkAppDemoController extends BaseController {

	@Autowired
	private AbkAppDemoService abkAppDemoService;
	
	@ModelAttribute
	public AbkAppDemo get(@RequestParam(required=false) String id) {
		AbkAppDemo entity = null;
		if (StringUtils.isNotBlank(id)){
			entity = abkAppDemoService.get(id);
		}
		if (entity == null){
			entity = new AbkAppDemo();
		}
		return entity;
	}
	
	@RequestMapping(value = {""})
	public String index( HttpServletRequest request, HttpServletResponse response, Model model) {
 
		//model.addAttribute("imei", page);
		model.addAttribute("Lng", 116.404 );
		model.addAttribute("Lat", 32.915);
		return "modules/abk/abkMaplet";
	}

}